import { INCREMENT } from '../constants/calc'

export default function calc(state = 10, action) {
  switch (action.type) {
    case INCREMENT:
      return state + action.payload
    default:
      return state
  }
}
